home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / am7.lha / AM7.AMOS / AM7.amosSourceCode next >
AMOS Source Code  |  1998-12-22  |  8KB  |  193 lines

  1. Rem AMOS-Keyboard AM7 v1.2   
  2. Rem written by Dennis Lenz 
  3. Rem
  4. Rem started:2/9/98 
  5. Rem
  6. Rem FREEWARE, (C) 1998 by FLUX-Entertainment 
  7. Rem
  8. Rem...remember: this is the first version of "amos am7 keyboard".  
  9. Rem in the future, i will programming next versions with AMOS Pro.   
  10. Rem
  11. Rem
  12. Rem planned improvements for next version(v2.0): 
  13. Rem
  14. Rem - real mouse control (would make playing much easier)
  15. Rem - better graphics  
  16. Rem - many more sounds & rhytmens
  17. Rem - some sound effects 
  18. Rem - real accompaniment-system like REAL keyboards
  19. Rem
  20. Rem ..so stay tuned for v2.0 of AM7 !! 
  21. Rem
  22. Rem note: because of the bad tempo-control in amos, i decided to 
  23. Rem       disable the graphical display of it. you can still use it, but 
  24. Rem       you won� t see any (display) changes in the tempo window...
  25. Rem  
  26. Rem
  27. Rem ------- set buffer to a huge value ------- 
  28. Set Buffer 240
  29. Load Iff "introbild.iff",0 : Screen Hide 0 : Rem what about load iff'ing your own pic?
  30. Hide : Curs Off 
  31. Screen Open 2,320,8,2,0 : Screen Display 2,128,300,,
  32. I=8
  33. Proc _BUMP_IN[I]
  34. Procedure _BUMP_IN[SPEED]
  35.    Screen 0 : SX=Screen Width(0) : SY=Screen Height(0) : SYH=(SY/2)
  36.    Screen Open 1,SX,SY,Screen Colour,32 : Curs Off : Flash Off : Cls 0 : Get Palette 0
  37.    
  38.    For I#=2 To SY Step SPEED : T#=SY/I# : IND=0 : For J#=1 To SY Step T#
  39.          Screen Copy 0,0,J#,SX,J#+1 To 1,0,IND
  40.    Inc IND : Next J# : Next I#
  41. End Proc
  42. Repeat 
  43.    If Key State(69) Then End 
  44. Until Inkey$<>""
  45. Sam Play 4,8
  46. Screen Open 0,640,256,16,Hires
  47. Curs Off : Flash Off : Hide 
  48. Load Iff "oberfl�che.iff"
  49. Load "sounds.abk"
  50. Load "kn�pfe.abk"
  51. Rem ---------------- put bobs first time on screen ----------- 
  52. Bob 1,25,46,4
  53. Bob 0,251,47,4
  54. Bob 3,466,156,1
  55. Bob 4,528,156,8
  56. Bob 10,550,41,10
  57. Bob 12,302,220,13
  58. Rem ----- setting up the variables ----- 
  59. P=0
  60. V=1
  61. MUSI=0
  62. BL=0
  63. VMAIN=158
  64. VVOICE=156
  65. VBEAT=158
  66. FILTER=0
  67. T=16
  68. _LBOB=12
  69. R$="rhytm1.abk"
  70. Rem -------------- 
  71. Key Speed 440,440
  72. Led Off 
  73. Hide 
  74. Rem ----- starting the mainloop -------- 
  75. Synchro 
  76. Do 
  77.    If Key State(49) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,46,4 : Wait Vbl : Bob 8,160,44,1 : Wait 5 : Bob Off 8 : R$="rhytm1.abk"
  78.    If Key State(50) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,62,4 : Wait Vbl : Bob 8,160,60,1 : Wait 5 : Bob Off 8 : R$="rhytm2.abk"
  79.    If Key State(51) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,80,4 : Wait Vbl : Bob 8,160,77,1 : Wait 5 : Bob Off 8 : R$="rhytm3.abk"
  80.    If Key State(52) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,98,4 : Wait Vbl : Bob 8,160,95,1 : Wait 5 : Bob Off 8 : R$="rhytm4.abk"
  81.    If Key State(53) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,117,4 : Wait Vbl : Bob 8,160,114,1 : Wait 5 : Bob Off 8 : R$="rhytm5.abk"
  82.    If Key State(54) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,137,4 : Wait Vbl : Bob 8,160,132,1 : Wait 5 : Bob Off 8 : R$="rhytm6.abk"
  83.    If Key State(55) Then BL=0 : Sam Play 4,8,24000 : Bob 1,25,156,4 : Wait Vbl : Bob 8,160,151,1 : Wait 5 : Bob Off 8 : R$="rhytm7.abk"
  84.    If Key State(64) Then Music Off : Sam Play 4,8 : Bob 6,45,220,1 : Wait 5 : Bob Off 6 : Bob Off 7 : M=0 : Return 
  85.    If Key State(80) Then V=1 : Sam Play 4,8,24000 : Bob 0,251,47,4 : Wait Vbl : Bob 2,349,44,1 : Wait 5 : Bob Off 2
  86.    If Key State(81) Then V=3 : Sam Play 4,8,24000 : Bob 0,251,63,4 : Wait Vbl : Bob 2,349,60,1 : Wait 5 : Bob Off 2
  87.    If Key State(82) Then V=2 : Sam Play 4,8,24000 : Bob 0,251,80,4 : Wait Vbl : Bob 2,349,77,1 : Wait 5 : Bob Off 2
  88.    If Key State(83) Then V=4 : Sam Play 4,8,24000 : Bob 0,251,98,4 : Wait Vbl : Bob 2,349,95,1 : Wait 5 : Bob Off 2
  89.    If Key State(84) Then V=5 : Sam Play 4,8,24000 : Bob 0,251,116,4 : Wait Vbl : Bob 2,349,113,1 : Wait 5 : Bob Off 2
  90.    If Key State(85) Then V=6 : Sam Play 4,8,24000 : Bob 0,251,134,4 : Wait Vbl : Bob 2,349,132,1 : Wait 5 : Bob Off 2
  91.    If Key State(86) Then V=7 : Sam Play 4,8,24000 : Bob 0,251,152,4 : Wait Vbl : Bob 2,349,151,1 : Wait 5 : Bob Off 2
  92.    If Key State(87) Then If BL=0 Then Load R$ : BL=1 : Gosub _BEATCOMP : Else Gosub _BEATCOMP
  93.    If Key State(69) Then Key Speed 10,1 : Music Off : Sam Stop : Goto _ENDE
  94.    If Key State(16) Then Sam Play 4,V,8000+P
  95.    If Key State(2) Then Sam Play 4,V,8500+P
  96.    If Key State(17) Then Sam Play 4,V,9000+P
  97.    If Key State(3) Then Sam Play 4,V,9500+P
  98.    If Key State(18) Then Sam Play 4,V,10000+P
  99.    If Key State(19) Then Sam Play 4,V,10600+P
  100.    If Key State(5) Then Sam Play 4,V,11200+P
  101.    If Key State(20) Then Sam Play 4,V,12000+P
  102.    If Key State(6) Then Sam Play 4,V,12600+P
  103.    If Key State(21) Then Sam Play 4,V,13300+P
  104.    If Key State(7) Then Sam Play 4,V,14300+P
  105.    If Key State(22) Then Sam Play 4,V,15000+P
  106.    If Key State(23) Then Sam Play 4,V,16000+P
  107.    If Key State(9) Then Sam Play 4,V,17000+P
  108.    If Key State(24) Then Sam Play 4,V,18050+P
  109.    If Key State(10) Then Sam Play 4,V,19005+P
  110.    If Key State(25) Then Sam Play 4,V,20010+P
  111.    If Key State(26) Then Sam Play 4,V,21000+P+P
  112.    If Key State(12) Then Sam Play 4,V,22000+P+P
  113.    If Key State(27) Then Sam Play 4,V,23800+P+P
  114.    If Key State(13) Then Sam Play 4,V,25000+P+P
  115.    If Key State(70) Then Gosub SET_FILT
  116.    _SETTEMPO:
  117.    If Key State(74) Then If T<>1 Then T=T-1 : Tempo T : Wait 1 : Goto _SETTEMPO : Else Goto _SETTEMPO
  118.    If Key State(94) Then If T<>80 Then T=T+1 : Tempo T : Wait 1 : Goto _SETTEMPO : Else Goto _SETTEMPO
  119.    MAINVOL:
  120.    If Key State(88) Then If MVOL+30*2<>1 Then MVOL=MVOL-1 : Volume MVOL+30*2 : Wait Vbl : Bob 3,466,VMAIN-MVOL,1 : Goto MAINVOL : Else Goto MAINVOL
  121.    If Key State(89) Then If MVOL+30*2<>63 Then MVOL=MVOL+1 : Volume MVOL+30*2 : Wait Vbl : Bob 3,466,VMAIN-MVOL,1 : Goto MAINVOL : Else Goto MAINVOL
  122.    VOCVOL:
  123.    If Key State(77) Then If VVOL+30*2<>1 Then VVOL=VVOL-1 : Volume 4,VVOL+30*2 : Wait Vbl : Bob 4,528,VVOICE-VVOL,8 : Goto VOCVOL : Else Goto VOCVOL
  124.    If Key State(76) Then If VVOL+30*2<>63 Then VVOL=VVOL+1 : Volume 4,VVOL+30*2 : Wait Vbl : Bob 4,528,VVOICE-VVOL,8 : Goto VOCVOL : Else Goto VOCVOL
  125.    If Key State(56) Then Gosub FTDOWN
  126.    If Key State(57) Then Gosub FTUP
  127.    Wait Key 
  128.    Clear Key 
  129.    Wait Vbl 
  130.    Tempo T
  131. Loop 
  132. _BEATCOMP:
  133. If M=0 Then Sam Play 4,8 : Bob 6,45,220,1 : Wait 5 : Bob Off 6 : Sam Stop : Music 1 : Bob 7,25,223,4 : M=1 : Return : Else If M=1 Then Music Off : Sam Play 4,8 : Bob 6,45,220,1 : Wait 5 : Bob Off 6 : Bob Off 7 : M=0 : Return 
  134. Wait Key 
  135. Return 
  136. _ENDE:
  137. Fade 1
  138. Wait 10
  139. Volume 1,63
  140. Wait 1
  141. Volume 63
  142. Screen Open 0,320,256,32,Lowres
  143. Curs Off : Flash Off : Hide 
  144. Load Iff "endbild.iff"
  145. Sam Play 2,7,8000
  146. Wait Key 
  147. Cls 0
  148. Sam Play 4,8,34000
  149. Show 
  150. End 
  151. SET_FILT:
  152. If FILTER=0
  153.    Sam Play 4,8,12000
  154.    Wait 2
  155.    Sam Stop 
  156.    Led On 
  157.    Bob 9,465,40,12
  158.    Wait Vbl 
  159.    Bob 10,550,40,9
  160.    FILTER=1
  161. Else 
  162.    Sam Play 4,8,16784
  163.    Wait 2
  164.    Sam Stop 
  165.    Led Off 
  166.    Bob Off 9
  167.    Bob 10,550,41,10
  168.    Wait Vbl 
  169.    FILTER=0
  170. End If 
  171. Return 
  172. FTUP:
  173. If _LBOB=11 Then P=P+20
  174. If _LBOB=12 Then P=P+20 : Bob 12,302,220,13 : _LBOB=13 : Return 
  175. If _LBOB=13 Then P=P+20 : Bob 12,302,220,14 : _LBOB=14 : Return 
  176. If _LBOB=14 Then P=P+20 : Bob 12,302,220,15 : _LBOB=15 : Return 
  177. If _LBOB=15 Then P=P+20 : Bob 12,302,220,16 : _LBOB=16 : Return 
  178. If _LBOB=16 Then P=P+20 : Bob 12,302,220,17 : _LBOB=17 : Return 
  179. If _LBOB=17 Then P=P+20 : Bob 12,302,220,18 : _LBOB=18 : Return 
  180. If _LBOB=18 Then P=P+20 : Bob 12,302,220,19 : _LBOB=19 : Return 
  181. If _LBOB=19 Then P=P+20 : Bob 12,302,220,20 : Return 
  182. Return 
  183. FTDOWN:
  184. Bob 11,300,220,22
  185. If _LBOB=12 Then P=P+20 : Bob 12,302,220,13 : _LBOB=11 : Return 
  186. If _LBOB=13 Then P=P+20 : Bob 12,302,220,14 : _LBOB=12 : Return 
  187. If _LBOB=14 Then P=P+20 : Bob 12,302,220,15 : _LBOB=13 : Return 
  188. If _LBOB=15 Then P=P+20 : Bob 12,302,220,16 : _LBOB=14 : Return 
  189. If _LBOB=16 Then P=P+20 : Bob 12,302,220,17 : _LBOB=15 : Return 
  190. If _LBOB=17 Then P=P+20 : Bob 12,302,220,18 : _LBOB=16 : Return 
  191. If _LBOB=18 Then P=P+20 : Bob 12,302,220,19 : _LBOB=17 : Return 
  192. If _LBOB=19 Then P=P+20 : Bob 12,302,220,20 : _LBOB=18 : Return 
  193. Return